<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>demo</title>
  <script type="text/javascript" src="../vue.js"></script>
</head>

<body>
  <div id="app" ref="one">
    <p>{{is?'热':'冷'}}</p>
    <button @click="is=!is">点击切换天气</button>
    <p v-if="is">今天好热呀</p>
    <p v-else>今天确实有点冷来着</p>
    <input type="text" placeholder="请输入你的分数" v-model="fraction">
    <p v-if="fraction>=80">优秀</p>
    <p v-else-if="fraction>=60">能看</p>
    <p v-else-if="fraction>0">不行就回去养猪吧</p>
    <button @click="add">dianji1</button>
  </div>
</body>
<script type="text/javascript">

  Vue.config.productionTip = false
  const vm = new Vue({
    el: "#app",
    data() {
      return {
        is: true,
        fraction: null
      }
    },
    methods: {
      add() {
        console.log(this.$refs);
      }
    }
  })
</script>

</html>